<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <meta name="referrer" content="no-referrer" />
    <title>{$active.name}-{$record.nickname}</title>
    {include file='default/public/header'/}

    
    <script src="__PUBLIC__/index/js/jquery-3.1.1.min.js"></script>
    <script src="__PUBLIC__/index/iscroll-master/build/iscroll.js"></script>
    <style type="text/css">
        .iframe-box{
            width:100%;height:100%;background: rgba(0,0,0,.5);position: fixed;z-index: 10000000;display: none;
        }
        .my_float_box{
            margin: auto;
            width: 90%;
            height: 80%;
            border: none;
            background: #ffffff;
            padding: 10px;
            overflow: auto;
            margin-top: 10%;
        }
    </style>
</head>
<script type="text/javascript">
    var myScroll;
    function loaded() {
        var myScroll = new IScroll('#wrapper', {
            scrollbars: true
        });
    }
    </script>
<body onload="loaded()" style="background: #f5f5f5;">
<div class="page-group">
    <div class="page">
        <div class="content">
            <div class="iframe-box">
                <div class="intro-box content my_float_box" id="wrapper">
<!--                     <h4>微信投票：</h4>
                    <p>微信端每日限投票1次，1次2分</p>
                    <h4>APP投票：</h4>
                    <p>APP端每日限投票3次，1次2分</p>
                    <p>凡APP参与投票的用户，即可获得1次0.1-8.8随机现金红包</p> -->
                    <p><img src="__PUBLIC__/index/images/sm_55.jpg" width="100%"></p>
                </div>
            </div>
            <nav class="bar bar-tab" style="height:0;top: 0;">
                {include file='default/public/fixed'/}
            </nav>
            {include file='default/public/nav'/}
            <div class="detail-info-box">
                <div class="nickname-support-box">
                    <div><span>{$record.contestant_number}</span>号</div>
                    <div>{$record.nickname}</div>
                    <div>鲜花:<span class="support-box">{$record.support}</span>朵</div>
                </div>
                <div class="no-box">
                    <div>排名:<span>{$no}</span></div>
                    <div><span class="look_other_2">查看排名</span></div>
                </div>

                <div class="xuanyan-box">
                    <div>名称: {$record.nickname}</div>
                </div>
<!--                 <div class="xuanyan-box">
                    <div>企业名称: {$record.shop_name}</div>
                </div> -->
                <div class="xuanyan-box">
                    <div>企业地址:{$record.shop_address}</div>
                    <!-- <div>{$record.shop_address}</div> -->
                </div>
                <div class="xuanyan-box">
                    <div>企业简介:{$record.shop_introduction}</div>
                    <!-- <div>{$record.shop_introduction}</div> -->
                </div>
                <div class="xuanyan-box">
                    <div>战队口号:{$record.xuanyan}</div>
                    <!-- <div>{$record.xuanyan}</div> -->
                </div>

            </div>
            <hr class="my-hr"/>
            <div style="min-height: 300px;">
                <div class="swiper-container-2" data-space-between='10' data-loop="1" style="width:100%;overflow: hidden;margin-top: 10px; padding-bottom:0;position: relative;">
                    <div class="swiper-wrapper ">
                        {foreach name="$record.images" id="vo"}
                        <div class="swiper-slide swiper-slide-1" ><img src="{$vo}" alt="" style="transform: scale(0.9,0.9);width:100%;"></div>
                       <!--  &width=500&height=400 -->
                        {/foreach}
                    </div>
                    <div class="swiper-pagination-2" style="position: absolute;bottom:0;width:100%;text-align: center"></div>
                </div>
            </div>
            {if condition="!$is_self"}
            <div class="form-box">
                <div class="item">
                    <div class="form-btn vote_btn" style="background: #e7ae9e;">送 {$number} 朵</div>
                    <div class="form-btn msh_btn" style="display: none;background: #e7ae9e;">再 送 {$number} 朵</div>
                </div>
                {if condition="!empty($active.is_sign_up)"}
<!--                 <div class="item">
                    <div class="form-btn sign_btn" style="background: #e7a56d;">我 也 要 参 加</div>
                </div> -->
                {/if}
                <div class="item">
                    <div class="form-btn look_other" style="background: #e7a56d" id="a">返 回 列 表</div>
                </div>
            </div>
            {/if}
        </div>
    </div>
</div>

{include file='default/public/js'/}
<script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/swiper.min.js"></script>
<script type="text/javascript">
    $(".swiper-container-2").swiper({
        pagination: '.swiper-pagination-2'
    });
    $('.look_other_2').click(function(){
        location.href = '{:url("index",["id"=>$active["id"],"order"=>2])}';
    });

</script>
{if condition="!$is_self"}
<script type="text/javascript">
    $('.look_other').click(function(){
        location.href = '{:url("index",["id"=>$active["id"],"order"=>2])}';
    });


    $('.sign_btn').click(function(){
        location.href = '{:url("signup",["id"=>$active["id"]])}';
    });

    $('.vote_btn').click(function(){

        // 2018年2月27日11:17:26 禁止微信投票
        //$('.iframe-box').show();

        $.post(
            '{:url("do_vote",["id"=>$active["id"]])}',
            'id={$id}&participant_id={$record.user_id}',
            function(data){
                if(data.code == 0){

                    $.toast(data.message);
                    var support_box = $('.support-box');
                    support_box.text(parseInt(support_box.text())+parseInt(data.support));
                }else {
                    $.toast(data.message, "cancel");
                     //$('.iframe-box').show();
                }

                if(data.code != 193){
                   // $('.vote_btn').hide();
                    // $('.msh_btn').show();
                }
            },
            'json'
        )
    });

    // $('.msh_btn').click(function(){
    //     $('.iframe-box').show();
    // });

    // $('.iframe-box').click(function(){
    //     $(this).hide();
    // });
</script>
{/if}
<script src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script type="text/javascript">

    var share_url = '{$active.share_info.url}';
    {if condition="$record.status == 1"}
    share_url = 'http://touwgf.5iyq0022.com/index.php/index/wx/detail/id/{$id}/user_id/{$record.user_id}';
    {/if}
    //初始化配置信息

            wx.config({
                debug: false,
                appId: '{$wxconfig.appId}', 
                timestamp: '{$wxconfig.timestamp}', 
                nonceStr: '{$wxconfig.nonceStr}', 
                signature: '{$wxconfig.signature}',
                jsApiList: [
                    'checkJsApi',
                    'onMenuShareTimeline',
                    'onMenuShareAppMessage',
                    'onMenuShareQQ',
                    'onMenuShareWeibo',
                    'onMenuShareQZone'
                ]
            });
            var share_title = '{$record.nickname}正在参加{$active.name}，快来送TA一朵花吧！';
            var share_desc = '{$active.share_info.intro}';
            var share_link = share_url;
            var share_imgUrl = '{$active.share_info.img}';
            var share_type = '';
            var share_dataUrl = '';

            wx.ready(function () {
                // 分享到朋友圈
                wx.onMenuShareTimeline({ title: share_title, link: share_link, imgUrl: share_imgUrl });
                // 分享给朋友
                wx.onMenuShareAppMessage({ title: share_title, desc: share_desc, link: share_link, imgUrl: share_imgUrl, type: share_type, dataUrl: share_dataUrl });
                // 分享到QQ
                wx.onMenuShareQQ({ title: share_title, desc: share_desc, link: share_link, imgUrl: share_imgUrl });
                // 分享到腾讯微博
                wx.onMenuShareWeibo({ title: share_title, desc: share_desc, link: share_link, imgUrl: share_imgUrl });
                // 分享到QQ空间
                wx.onMenuShareQZone({ title: share_title, desc: share_desc, link: share_link, imgUrl: share_imgUrl });
            });



</script>
</body>
</html>